home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
106 - Proboard KEY Floppy - Must be in Drive 1.dsk
/
STAR.TREK.PRO5
/
STAR.MAIN.S
< prev
next >
Wrap
Text File
|
1989-08-03
|
7KB
|
221 lines
; Debugged by John P. Edwards
; Tested and Supported on ProBOARD @ 805-239-4292
; Version 1.5
Public damage
Public dam.ret
Public end.game
Public congrats
Public shoot
Public phasers
Public srs.scan
Public lrs.start
Lrs.start
on nocar goto termin
if nibble(12)<4 print"Long range sensors are inoperable":link dx$+"star","begin"
print "Long range scan for quadrant "q2" ,"q1
o1$="-------------------":print o1$
for i=(q1-1) to (q1+1):for j=(q2-1) to (q2+1):gosub convert
next:print":":print o1$:next
link dx$+"star","commands"
Convert
if (i<1) print ": ***";:return
if (j>8) print ": ***";:return
if (i>8) print ": ***";:return
if (j<1) print ": ***";:return
i$=str$(byte((i*8-8)+j)+1000):i$=right$(i$,3):print ": "i$;
s8=((j*3-2)+(i*24-24))
if s8=1 tr$=i$+right$(tr$,189):return
if s8>=190 tr$=left$(tr$,189)+i$:return
if (i<1) or (i>8) or (j<1) or (j>8) print ": +++";:return
tr$=left$(tr$,s8-1)+i$+right$(tr$,190-s8):return
Shoot
on nocar goto termin
if (kg<=0) and (fr$="NAV") goto exit.sho:else if kg<=0 linkdx$+"star","begin"
if d0<>0 print"Starbase shields protect the Enterprise":goto exit.sho
for i= 1 to kg:if nibble(6+i)<=0 goto shoot2
f1=nibble(0+i)-s1:if f1<0 f1=s1-nibble(0+i)
f2=nibble(3+i)-s2:if f2<0 f2=s2-nibble(3+i)
if f1=0 f1=1
if f2=0 f2=1
f1=f1*f2:h=(nibble(6+i)*30)/f1:h=h+random(10):xx$=rnd$
print h" unit hit on Enterprise from sector "nibble(3+i)","nibble(0+i)
if s>h goto contin
if i=kg goto killed:else i=kg:next:goto killed
Contin
s=s-h:if s=0 s=1
print" < Shields Down to "s" units >":if h<20 goto shoot2
r1=random(100):xx$=rnd$:if (r1>60) or ((h*10)/s+1)<1 goto shoot2
r1=random(8):r1=r1+9:xx$=rnd$
if h/10>nibble(r1) nibble(r1)=nibble(r1)-nibble(r1):else nibble(r1)=nibble(r1)-h/10
fr$="SHOOT":linkdx$+"star","sys.dam"
Dam.ret
on nocar goto termin
if fr$="DAM" goto sys.dam
print" Damage Control Reports `"n2$" damaged by the hit` ("h/10" damage)"
Shoot2
next
Exit.sho
pop:if fr$="NAV" linkdx$+"star","nav.shoo":else linkdx$+"star","begin"
End.game
on nocar goto termin
print" It is stardate "x$:goto results
Killed
print\\"The Enterprise has been destroyed. The Federation will be conquered.":goto end.game
Results
print"There were "kt" Klingon battle cruisers left at the end of your mission"
Res2ults
print\\:if b9=0 goto termin
print" The Federation is in need of a new Starship commander for a similar"
print" mission - - - - If there is a volunteer let him step forward"
input" and enter AYE :";ar$:if ar$="AYE" linkdx$+"star.logon","start"
Quit
link dx$+"star.logon","resign"
Termin
link dx$+"star.logon","termin"
Congrats
on nocar goto termin
print"Congratulations, Captain! The last Klingon battle cruiser"
print"menacing the Federation has been destroyed."
print\"Entering Your Name in the Hall of Fame..."
close:open #1,dx$+"star.com":append #1
ax$=left$(a3$+"....................",20)
print #1,chr$(32,17)+ax$+" "+Time$+" "+Date$
close:goto res2ults
Srs.scan
on nocar goto termin
for i=s1-1 to s1+1:for j=s2-1 to s2+1
if i<1 or i>8 goto srs2.scan
if j<1 or j>8 goto srs2.scan
a$=">!<":z1=i:z2=j:gosub cstring:if z3=1 goto srs3.scan
Srs2.scan
next:next
d0=0:goto srs4.scan
Srs3.scan
if j<s2+1 j=s2+1:next
if i<s1+1 i=s1+1:next
d0=100:c$="Docked":e=e0:p=p0
print "Shields dropped for docking purposes":s=0:goto srs5
Srs4.scan
if kg>0 c$="*RED*":goto srs5
c$="Green":if e<e0/10 c$="Yellow"
Srs5
if nibble(11)>3 goto srs.print
print\\"*** SHORT RANGE SENSORS ARE OUT ***"\:link dx$+"star","begin"
Srs.print
x=(clock(2)-clock(1))/60:x$=right$("0"+str$(x),2):x$=str$(tr)+x$
i$= " 1 2 3 4 5 6 7 8":j=0:i=0
i1$=" ---------------------------------":print i$:printi1$:print"1|";
for i=1to8:for j=1to8:print mid$(q$,(j*3-2)+(i*24-24),3)" ";:
next:goto screen
Screen
if i=1 print"| Stardate "x$:print"2|";:next
if i=2 print"| Condition "c$:print"3|";:next
if i=3 print"| Quadrant "q2","q1:print"4|";:next
if i=4 print"| Sector "s2","s1:print"5|";:next
if i=5 print"| Photon Torpedoes "p:print"6|";:next
if i=6 print"| Total Energy "e+s:print"7|";:next
if i=7 print"| Shields "s:print"8|";:next
if i=8 print"| Klingons remaining "kt:print i1$
next:link dx$+"star","commands"
Phasers
on nocar goto termin
if nibble(13)<4 print "Phasers are inoperative":linkdx$+"star","begin"
if kg>0 goto phasers2
print"Science Officer Spock reports: Sensors show no enemy ships in this quadrant":linkdx$+"star","begin"
Phasers2
if nibble(17)<0 print"Computer failure hampers accuracy"
print\"Phasers locked on target; energy available = "e" units"
Phasers3
fr$="PHA":input"Number of energy units to fire ";x
if x<=0 then link dx$+"star","begin"
if e-x<0 then goto phasers3
e=e-x:h1=x/kg
for i=1to3:if nibble(6+i)<=0 goto pha.end
f1=nibble(0+i)-s1:if f1<0 f1=s1-nibble(0+i)
f2=nibble(3+i)-s2:if f2<0 f2=s2-nibble(3+i)
if f1=0 f1=1
if f2=0 f2=1
f1=f1*f2:j=h1/f1:h=j/5
if h>byte(6+i)/10 goto pha4
print "Sensors show no damage to enemy at ";
print nibble(3+i)","nibble(0+i):goto pha.end
Pha4
x=nibble(6+i):x=x-h:nibble(6+i)=x
print h*10" unit hit on Klingon at sector "nibble(3+i)","nibble(0+i)
if x<=0 print"**** Klingon destroyed ****":goto pha5
print\" Sensors show "nibble(6+i)*10" units remaining for Klingon";
if i print " at "nibble(3+i)","nibble(0+i):else print
goto pha.end
Pha5
kg=kg-1:kt=kt-1:z1=nibble(0+i):z2=nibble(3+i):a$=" ":gosub astring
nibble(6+i)=0:byte((8*q1-8)+q2)=byte((8*q1-8)+q2)-100
in=((8*q1-8)+q2):a$=right$(str$(byte(in)+1000),3)
s8=(q2*3-2)+(q1*24-24)
if s8=1 tr$=a$+right$(tr$,189):goto pha5
if s8>=190 tr$=left$(tr$,189)+a$:goto pha5
tr$=left$(tr$,s8-1)+a$+right$(tr$,190-s8)
Pha5
if kt<=0 goto congrats
Pha.end
next:gosub shoot
Astring
s8=(z2*3-2)+(z1*24-24)
if s8=1 q$=a$+right$(q$,189):return
if s8>=190 q$=left$(q$,189)+a$:return
q$=left$(q$,s8-1)+a$+right$(q$,190-s8):return
Cstring
s8=((z2*3-2)+(z1*24-24)):z3=0
if mid$(q$,s8,3)<>a$ return
z3=1:return
Damage
on nocar goto termin
if nibble(15)<2 print"Damage Control too damaged to respond"\:goto dam.end
print " Device State of Repair"
for r1= 10 to 17:if nibble(r1)<0 nibble(r1)=0:if nibble(r1)>10 nibble(r1)=10
fr$="DAM":link dx$+"star","sys.dam"
Sys.dam
x=30-len(n2$):print" "n2$;chr$(32,x);nibble(r1)*10" %":next
Dam.end
link dx$+"star","begin"
; EOF